<?php
require_once("./define/define_general.php");
require_once("./define/define_text.php");
require_once("config.php");
require_once("./class/PrintQuery.php");

global $db;
$db = new PDO("mysql:host=".DB_HOSTNAME.";dbname=".DB_DATABASE, DB_USERNAME, DB_PASSWORD);

$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
?>
<html>
<title>Administration Association Enseirb</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<head>
<link rel="stylesheet" type="text/css" href="css/jbar.css" media="all" />
<link rel="stylesheet" type="text/css" href="css/tablesorter.css"
	media="all" />
<link rel="stylesheet" type="text/css" href="css/style.css" media="all" />
<link rel="stylesheet" type="text/css"
	href="css/jquery-ui-1.8.16.custom.css" media="all" />
<script type="text/javascript"
	src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.jbar.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
			$(document).ready(function(){ 
   				 jQuery('.jbar').jbar();
   			     $(".tablesorter").tablesorter(); 
   				 $(".datepicker" ).datepicker({ dateFormat: 'yy-mm-dd' });
  			});
		</script>
</head>
<body>
	<div id="content">
		<div id="header"></div>
		<div id="menu" style="display: block; height: 50px;">
			<ul class="jbar">
				<li><a href="#"><?php echo _ASSOCIATION_; ?> </a>
					<ul>
						<li><a href="?module=association&action=addForm"
							class="ajax_request"><?php echo _ADD_; ?> </a></li>

						<li><a href="?module=association&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _INDIVIDU_; ?> </a>
					<ul>
						<li><a href="?module=individu&action=addForm" class="ajax_request"><?php echo _ADD_; ?>
						</a></li>

						<li><a href="?module=individu&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _ADHERENT_; ?> </a>
					<ul>
						<li><a href="?module=adherent&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _ADHESION_; ?> </a>
					<ul>
						<li><a href="?module=adhesion&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

						<li><a href="?module=adhesion&action=addForm" class="ajax_request"><?php echo _ADD_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _EVENEMENT_; ?> </a>
					<ul>
						<li><a href="?module=evenement&action=addForm"
							class="ajax_request"><?php echo _ADD_; ?> </a></li>

						<li><a href="?module=evenement&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _FINANCEMENT_; ?> </a>
					<ul>
						<li><a href="?module=financement&action=addForm"
							class="ajax_request"><?php echo _ADD_; ?> </a></li>

						<li><a href="?module=financement&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _PARTENAIRE_; ?> </a>
					<ul>
						<li><a href="?module=partenaire&action=addForm"
							class="ajax_request"><?php echo _ADD_; ?> </a></li>

						<li><a href="?module=partenaire&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _OBJECTIF_; ?> </a>
					<ul>
						<li><a href="?module=objectif&action=addForm" class="ajax_request"><?php echo _ADD_; ?>
						</a></li>

						<li><a href="?module=objectif&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _ROLE_; ?> </a>
					<ul>
						<li><a href="?module=role&action=addForm" class="ajax_request"><?php echo _ADD_; ?>
						</a></li>

						<li><a href="?module=role&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _LIEU_; ?> </a>
					<ul>
						<li><a href="?module=lieu&action=addForm" class="ajax_request"><?php echo _ADD_; ?></a></li>

						<li><a href="?module=lieu&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _NEWS_; ?> </a>
					<ul>
						<li><a href="?module=news&action=addForm" class="ajax_request"><?php echo _ADD_; ?>
						</a></li>

						<li><a href="?module=news&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _RESPONSABLE_; ?> </a>
					<ul>
						<li><a href="?module=responsable&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul></li>
				<li><a href="#"><?php echo _FREQUENCE_; ?> </a>
					<ul>
						<li><a href="?module=frequence&action=addForm"
							class="ajax_request"><?php echo _ADD_; ?> </a>
						</li>
						<li><a href="?module=frequence&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a>
						</li>
					</ul></li>
				<li><a href="#"><?php echo _PARTICIPANT_; ?> </a>
					<ul>
						<li><a href="?module=participant&action=addForm"
							class="ajax_request"><?php echo _ADD_; ?> </a>
						</li>
						<li><a href="?module=participant&action=list" class="ajax_request"><?php echo _LIST_; ?>
						</a></li>

					</ul>
				</li>
				<li><a href="#"><?php echo "Statistiques"; ?> </a>
					<ul>
						<li><a href="?module=statistique&action=topParticipant"
							class="ajax_request"><?php echo _TOP_PARTICIPANT_; ?> </a></li>

						<li><a href="?module=statistique&action=topEvenement"
							class="ajax_request"><?php echo _TOP_EVENT_; ?> </a></li>
						<li><a href="?module=statistique&action=getTopFinanceForm"
							class="ajax_request"><?php echo _TOP_FINANCE_; ?> </a></li>
							
						<li><a href="?module=statistique&action=getFinanceForm"
							class="ajax_request"><?php echo _FINANCE_AT_DATE; ?> </a></li>

					</ul></li>
			</ul>
		</div>
		<div id="content" style="display: block;">
			
			
		<?php if(isset($_GET['module']) && file_exists(MODULES_PATH.$_GET['module'].'.php')){

		    include(MODULES_PATH.$_GET['module'].'.php');
		}
		?>
		</div>
		<div id="footer">
			Projet de SGBD pour l'<a href="http://www.enseirb-matmeca.fr">ENSEIRB-MATMECA</a>.
			Réalisé par Isaline Laurent et Paul Laturaze. I2G3 - 2011-2012
		</div>
		<div id="time">
			
			
			
			
		<?php $time = microtime();
		$time = explode(' ', $time);
		$time = $time[1] + $time[0];
		$finish = $time;
		$total_time = round(($finish - $start), 4);
		echo 'Page générée en '.$total_time.' secondes.'."\n";
		?>
		</div>
	</div>
</body>
</html>



<?php
$db = null;
?>
